package com.example.server.web.domain;



import java.util.Date;
import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.server.web.utils.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* 
* @TableName major
* @author YHJ
*/
@ApiModel(value = "专业")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "major")
public class Major implements Serializable {

    private static final long serialVersionUID=1L;

    /**
    * 专业id
    */
    @ApiModelProperty("专业id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
    * 学院id
    */
    @ApiModelProperty("学院id")
    @NotNull(message = "学院id不能为空")
    private Long academyId;

    /**
    * 专业名称
    */
    @ApiModelProperty(value = "专业名称",required = true)
    @NotBlank(message = "专业名称不能为空")
    private String name;

    /**
    * 专业代码
    */
    @ApiModelProperty(value = "专业代码",required = true)
    private String code;

    /**
    * 创建人id
    */
    @ApiModelProperty("创建人id")
    private Long createById;

    /**
    * 创建时间
    */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = DateUtils.FORMAT_YYYY_MM_DD_HH_MM_SS)
    private Date createByTime;


}
